<?php
	require_once('MysqlConnect.php');
	$username=$_POST['username'];
	$password=$_POST['password'];

	$sql="select * from userlist";
	if(!$sel=mysql_query($sql)) echo "账号数据库无法打开" ;
	

	while($data=mysql_fetch_assoc($sel)){
		if($data['username']==$username)
			if($data['password']==$password) {echo "<script>alert('登陆成功');window.location.href='Article_manage.php'</script>"; exit();}
	}

	echo "<script>alert('登陆失败,输入的账号或密码有误');window.location.href='MainPage.php'</script>";



?>